<?php

/**
 * Класс, отображающий расписание студентов
 *
 * @author asenko
 */
class groups extends common implements content {

    const ERROR_DATA_NOT_FOUND_TEXT = 'Data not found',
            ERROR_DATA_NOT_FOUND_CODE = 2;

    public function selector() {

        $stmt = $this->getDB()->query('SELECT `GROUP_ID` AS `ID`, `TITLE` FROM `SCHEDULE_GROUPS`');
        if (!$stmt) {
            throw new Exception(self::ERROR_DATA_NOT_FOUND_TEXT, self::ERROR_DATA_NOT_FOUND_CODE);
        }
        $result = $stmt->fetchAll(PDO::FETCH_ASSOC);
        return $result;
    }

    public function schedule($id) {
        ;
    }

}
